package blyth;

public class WaitTask extends Task {

    public int duration;

    public WaitTask(World world, int priority, int duration) {
        super(world, priority, null);
        this.duration = duration;
    }

    @Override
    public boolean IsValid() {
        if (duration == 0) {
            return false;
        }
        return true;
    }

    @Override
    public int AvailabilityFrom(Agent agent) {
        // We don't need to find a fit agent
        return 0;
    }

    @Override
    public Command Solve() {
        duration--;
        return new Command(Command.Action.Wait,0,0);
    }
}
